<script setup lang="ts">
import { getCurrentInstance } from 'vue'

const { proxy }: any = getCurrentInstance()

proxy.$message({
  message: 'Congrats, this is a success message.',
  type: 'success'
})
</script>

<template>
  <div class="home">
    <div class="text">首页</div>
  </div>
</template>

<style lang="scss">
.home {
  .text {
    color: aquamarine;
  }
}
</style>
